package com.phiture.erp.produce.core.pojo.dto;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.math.BigDecimal;
import java.time.LocalDate;

/**
 * @author YH
 * @date 2025-05-09-8:20
 */

@Getter
@AllArgsConstructor
public class ErpMaterialRequirementsDTO {
    private Long materialId;
    private String materialBarCode;
    private String materialName;
    private Long materialUnitId;
    private String materialUnitName;
    private String materialStandard;
    private Integer materialAttr;
    private BigDecimal planQuantity;
    private BigDecimal actualQuantity;
    private LocalDate startDate;
    private LocalDate endDate;

    public static ErpMaterialRequirementsDTO of(Long materialId, String materialBarCode, String materialName, Long materialUnitId,
                                                String materialUnitName, String materialStandard, Integer materialAttr, BigDecimal qty,
                                                LocalDate startDate, LocalDate endDate){
        return new ErpMaterialRequirementsDTO(
                materialId, materialBarCode, materialName, materialUnitId,
                materialUnitName, materialStandard, materialAttr, qty, qty,
                startDate, endDate
        );
    }
}
